package com.cicadamob.contact.api.service;

import java.io.Serializable;
import java.util.List;

import android.graphics.Bitmap;

public class Contact implements Serializable, Comparable<Contact> {
	private static final long serialVersionUID = 1208130358715873230L;
	// 组织id
	private int orgId = -1;
	// 用户id
	private String userid;
	// 来源id 1个人，2客户，3同事，4群组
	private String sourceId;
	// 名字
	private String displayName;
	// 电话
	private String linkPhone;
	// 短号
	private String shortPhone;
	// 公司
	private String companyPath;
	// 全拼
	private String allPy;
	// 首拼
	private String firstPy;
	// 字母
	private String Letter;
	// 图片url
	private String iconUrl;
	// 职位
	private String jobprofession;
	// 工号
	private String jobNumber;
	// 公司电话？
	private String officeNumber;
	// 公司地址
	private String officeAddress;
	// 邮箱
	private String email;
	// 生日
	private String birthday;
	// 添加昵称
	private String nickName;
	// 排序字段
	private long sort;
	// 联系人头像
	private Bitmap contactPhoto;
	// 是否已安装客户端，1是已经安装，0是未安装
	private int install;
	// 是否为群组创建者
	private boolean isCreater;
	// 是否可以被取消
	private boolean isCancelByUser = true;
	// 群组名称
	private String groupName;
	// 打电话时间
	private String callTime;
	// 类型,来电，去电
	private String callType;
	
	private String callStatus;
	// 和某联系人通话记录总数
	private int callCount;
	// 通话记录id
	private String callId;
	// 头像
	private String imagepath;

	private String user_type;// '群成员类型1:群主，2：群成员';

	private String group_id;// 所属分组id

	private String idInGroup;// 在群组中的id

	// 在fnamefpy中排第几个
	private long fnamefpynum;

	private String department;// 部门
	private String user_status;// '用户状态0：待审核；1：可用。2：冻结';
	private String create_time;// 创建时间
	private String create_user;// 创建人账号
	private String gu_remark;// 备注
	private String isAut;// '是否已经认证 0：未认证。1： 已经认证';
	private String ISJTUSER;// '是否是集团用户0：否。1： 是';
	private String company; // 公司
	// 姓的的第一个字母
	private String fnamefpy;

	private boolean isChecked;
	// 播放语音状态
	private int playSoundSatus;
	// 声音文件url
	private String soundUrl;
	private String soundTime;
	// 0、1 1是集团管理员
	private int role = 0;
	//群组有多少成员
	private int memberCount;
	//
	private List<String> phoneList;
	//是否是常用联系人
	private boolean isCommonContact;
	private boolean isFromContact = false;
	
	public boolean isFromContact() {
		return isFromContact;
	}

	public void setFromContact(boolean isFromContact) {
		this.isFromContact = isFromContact;
	}

	public boolean isCommonContact() {
		return isCommonContact;
	}

	public void setCommonContact(boolean isCommonContact) {
		this.isCommonContact = isCommonContact;
	}

	public List<String> getPhoneList() {
		return phoneList;
	}

	public void setPhoneList(List<String> phoneList) {
		this.phoneList = phoneList;
	}

	public int getMemberCount() {
		return memberCount;
	}

	public void setMemberCount(int memberCount) {
		this.memberCount = memberCount;
	}

	public int getrole() {
		return role;
	}

	public void setrole(int role) {
		this.role = role;
	}

	public String getSoundTime() {
		return soundTime;
	}

	public void setSoundTime(String soundTime) {
		this.soundTime = soundTime;
	}

	public String getSoundUrl() {
		return soundUrl;
	}

	public void setSoundUrl(String soundUrl) {
		this.soundUrl = soundUrl;
	}

	public String getFnamefpy() {
		return fnamefpy;
	}

	public void setFnamefpy(String fnamefpy) {
		this.fnamefpy = fnamefpy;
	}

	public String getCompany() {
		return company;
	}

	public void setCompany(String company) {
		this.company = company;
	}

	public String getUser_status() {
		return user_status;
	}

	public void setUser_status(String user_status) {
		this.user_status = user_status;
	}

	public String getCreate_time() {
		return create_time;
	}

	public void setCreate_time(String create_time) {
		this.create_time = create_time;
	}

	public String getCreate_user() {
		return create_user;
	}

	public void setCreate_user(String create_user) {
		this.create_user = create_user;
	}

	public String getGu_remark() {
		return gu_remark;
	}

	public void setGu_remark(String gu_remark) {
		this.gu_remark = gu_remark;
	}

	public String getIsAut() {
		return isAut;
	}

	public void setIsAut(String isAut) {
		this.isAut = isAut;
	}

	public String getISJTUSER() {
		return ISJTUSER;
	}

	public void setISJTUSER(String iSJTUSER) {
		ISJTUSER = iSJTUSER;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public String getDepartment() {
		return department;
	}

	public void setDepartment(String department) {
		this.department = department;
	}

	public long getFnamefpynum() {
		return fnamefpynum;
	}

	public void setFnamefpynum(long fnamefpynum) {
		this.fnamefpynum = fnamefpynum;
	}

	public String getIdInGroup() {
		return idInGroup;
	}

	public void setIdInGroup(String idInGroup) {
		this.idInGroup = idInGroup;
	}

	public String getGroup_id() {
		return group_id;
	}

	public void setGroup_id(String group_id) {
		this.group_id = group_id;
	}

	public String getUser_type() {
		return user_type;
	}

	public void setUser_type(String user_type) {
		this.user_type = user_type;
	}

	public String getImagepath() {
		return imagepath;
	}

	public void setImagepath(String imagepath) {
		this.imagepath = imagepath;
	}

	public int getOrgId() {
		return orgId;
	}

	public void setOrgId(int orgId) {
		this.orgId = orgId;
	}

	public String getUserid() {
		return userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}

	public String getSourceId() {
		return sourceId;
	}

	public void setSourceId(String sourceId) {
		this.sourceId = sourceId;
	}

	public String getDisplayName() {
		return displayName;
	}

	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}

	public String getLinkPhone() {
		return linkPhone;
	}

	public void setLinkPhone(String linkPhone) {
		this.linkPhone = linkPhone;
	}

	public String getShortPhone() {
		return shortPhone;
	}

	public void setShortPhone(String shortPhone) {
		this.shortPhone = shortPhone;
	}

	public String getCompanyPath() {
		return companyPath;
	}

	public void setCompanyPath(String companyPath) {
		this.companyPath = companyPath;
	}

	public String getAllPy() {
		return allPy;
	}

	public void setAllPy(String allPy) {
		this.allPy = allPy;
	}

	public String getFirstPy() {
		return firstPy;
	}

	public void setFirstPy(String firstPy) {
		this.firstPy = firstPy;
	}

	public String getIconUrl() {
		return iconUrl;
	}

	public void setIconUrl(String iconUrl) {
		this.iconUrl = iconUrl;
	}

	public String getJobprofession() {
		return jobprofession;
	}

	public void setJobprofession(String jobprofession) {
		this.jobprofession = jobprofession;
	}

	public String getJobNumber() {
		return jobNumber;
	}

	public void setJobNumber(String jobNumber) {
		this.jobNumber = jobNumber;
	}

	public String getOfficeNumber() {
		return officeNumber;
	}

	public void setOfficeNumber(String officeNumber) {
		this.officeNumber = officeNumber;
	}

	public String getOfficeAddress() {
		return officeAddress;
	}

	public void setOfficeAddress(String officeAddress) {
		this.officeAddress = officeAddress;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getBirthday() {
		return birthday;
	}

	public void setBirthday(String birthday) {
		this.birthday = birthday;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public long getSort() {
		return sort;
	}

	public void setSort(long sort) {
		this.sort = sort;
	}

	public Bitmap getContactPhoto() {
		return contactPhoto;
	}

	public void setContactPhoto(Bitmap contactPhoto) {
		this.contactPhoto = contactPhoto;
	}

	public int getInstall() {
		return install;
	}

	public void setInstall(int install) {
		this.install = install;
	}

	public boolean isCreater() {
		return isCreater;
	}

	public void setCreater(boolean isCreater) {
		this.isCreater = isCreater;
	}

	public boolean isCancelByUser() {
		return isCancelByUser;
	}

	public void setCancelByUser(boolean isCancelByUser) {
		this.isCancelByUser = isCancelByUser;
	}

	public String getGroupName() {
		return groupName;
	}

	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}

	public String getLetter() {
		return Letter;
	}

	public void setLetter(String letter) {
		Letter = letter;
	}

	public String getCallTime() {
		return callTime;
	}

	public void setCallTime(String callTime) {
		this.callTime = callTime;
	}

	public String getCallType() {
		return callType;
	}

	public void setCallType(String callType) {
		this.callType = callType;
	}

	public int getCallCount() {
		return callCount;
	}

	public void setCallCount(int callCount) {
		this.callCount = callCount;
	}

	public String getCallId() {
		return callId;
	}

	public void setCallId(String callId) {
		this.callId = callId;
	}

	public boolean isChecked() {
		return isChecked;
	}

	public void setChecked(boolean isChecked) {
		this.isChecked = isChecked;
	}

	public int getPlaySoundSatus() {
		return playSoundSatus;
	}

	public void setPlaySoundSatus(int playSoundSatus) {
		this.playSoundSatus = playSoundSatus;
	}

	@Override
	public int compareTo(Contact anOther) {
		// TODO Auto-generated method stub
		return Long.valueOf(sort).compareTo(Long.valueOf(anOther.getSort()));
	}

	private int opType = -2;

	// @目标成员，包括操作类型（opType）0：新增 1：删除 -1是原来的

	public int getopType() {
		return opType;
	}

	public void setopType(int opType) {
		this.opType = opType;
	}

	public String getCallStatus() {
		return callStatus;
	}

	public void setCallStatus(String callStatus) {
		this.callStatus = callStatus;
	}
	
	private int blackNameType=0; //黑名单类型  0 电话  1短信
    private long interectTime=0;//拦截时间
	public long getInterectTime() {
		return interectTime;
	}

	public void setInterectTime(long interectTime) {
		this.interectTime = interectTime;
	}

	public int getBlackNameType() {
		return blackNameType;
	}

	public void setBlackNameType(int blackNameType) {
		this.blackNameType = blackNameType;
	}
}
